package com.muyu.rabbitmqdemo.receiver;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @ClassName: RabbitReceiver
 * @Author: Zirun.Xin
 * @Date: 2025/4/9 上午9:28
 * @Version: 1.0
 * @Description: rabbitMQ消费者
 */
@Slf4j
@Component
@RabbitListener(queues = "test1-queue")
public class RabbitReceiver {

    @RabbitHandler
    public void process(String msg) {
        log.info("Receiver：消费成功：{}", msg);
    }
}
